﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MenuTreeManage.aspx.cs" Inherits="Admin_MenuTreeManage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <link href="~/css/PageStyle.css" rel="Stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            color: #FF0000;
        }
    </style>
</head>
<body style="width:97%">
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div>
        <table style="width: 100%">
            <tr>
                <td colspan="2" style="text-align: center">
                    <h1>菜单管理</h1></td>
            </tr>
            <tr>
                <td style="vertical-align:top;">
                    <asp:UpdatePanel ID="UpdatePanel3" runat="server">
                        <ContentTemplate>
                            <br />
                            <asp:TreeView ID="treeMenu" runat="server" ExpandDepth="1" 
                        onselectednodechanged="treeMenu_SelectedNodeChanged">
                            </asp:TreeView>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnSure" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
                <td style="text-align: left; vertical-align: top;">
                    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                        <ContentTemplate>
                            <table style="text-align: left;">
                                <tr>
                                    <td style="text-align: right">
                                        菜单ID：</td>
                                    <td style="text-align: left">
                                        <asp:TextBox ID="tbID" runat="server" Enabled="False"></asp:TextBox>
                                        <span class="style1">*此项为系统自动生成，不可输入或更改 </span>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        菜单名：</td>
                                    <td style="text-align: left">
                                        <asp:TextBox ID="tbMenuName" runat="server" Width="300px"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbMenuName"
                                    ErrorMessage="菜单名不能为空"></asp:RequiredFieldValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        菜单链接：</td>
                                    <td style="text-align: left;">
                                        <asp:TextBox ID="tbMenuUrl" runat="server" Width="400px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        菜单图片：</td>
                                    <td style="text-align: left;">
                                        <asp:TextBox ID="tbMenuImgUrl" runat="server" Width="400px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        菜单展开图片：</td>
                                    <td style="text-align: left;">
                                        <asp:TextBox ID="tbMenuImgExpand" runat="server" Width="400px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        菜单类型：</td>
                                    <td style="text-align: left;">
                                        <asp:RadioButton ID="rbRoot" runat="server" AutoPostBack="True"
                                    GroupName="1" Text="根菜单" CssClass="radio" 
                                    oncheckedchanged="rbRoot_CheckedChanged"/>
                                        <asp:RadioButton ID="rbChild" runat="server" AutoPostBack="True" GroupName="1" 
                                    Text="中间菜单"  CssClass="radio" oncheckedchanged="rbRoot_CheckedChanged" />
                                        <asp:RadioButton ID="rbLeaf" runat="server" AutoPostBack="True" GroupName="1" 
                                    Text="叶子菜单" CssClass="radio" oncheckedchanged="rbRoot_CheckedChanged"/>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        <asp:Label ID="Label1" runat="server" Text="父菜单："></asp:Label>
                                    </td>
                                    <td style="text-align: left; ">
                                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                            <ContentTemplate>
                                                <asp:DropDownList ID="DropMenu" runat="server" Width="300px"></asp:DropDownList>
                                            </ContentTemplate>
                                            <Triggers>
                                                <asp:AsyncPostBackTrigger ControlID="rbRoot" />
                                                <asp:AsyncPostBackTrigger ControlID="rbChild" />
                                                <asp:AsyncPostBackTrigger ControlID="rbLeaf" />
                                            </Triggers>
                                        </asp:UpdatePanel>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        菜单序号：</td>
                                    <td style="text-align: left;">
                                        <asp:TextBox ID="tb_Sort" runat="server" Width="50px">0</asp:TextBox>
                                        （注：默认为0，不设置或重复设置菜单将按建立先后数据排列）</td>
                                </tr>
                                <tr>
                                    <td style="text-align: right">
                                        菜单权限：</td>
                                    <td style="text-align: left;">
                                        <asp:TextBox ID="tb_Power" runat="server" Width="50px">0</asp:TextBox>
                                        （注：默认为0，设置后将影响不同权限的用户菜单的访问）</td>
                                </tr>
                                <tr>
                                    <td style="text-align: center" colspan="2">
                                        <asp:Button ID="btnSure" runat="server" Text="确定" onclick="btnSure_Click"  />
                                        &nbsp;
                                        <asp:Button ID="btnDel" runat="server"  Text="删除"  CausesValidation="False" 
                                            onclick="btnDel_Click" Enabled="False" />
                                        &nbsp;
                                        <asp:Button ID="btnReset" runat="server"  Text="重置"  CausesValidation="False" 
                                    onclick="btnReset_Click" />
                                    </td>
                                </tr>
                                <tr>
                                    <td style="text-align: center" colspan="2">
                                        <asp:Label ID="lblMessage" runat="server"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="treeMenu" 
                                EventName="SelectedNodeChanged" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
            </tr>
        </table>
    
    </div>
    </form>
</body>
</html>
